#pragma once

typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef signed char i8;
typedef signed short i16;
typedef signed int i32;
typedef signed long long i64;
#if ARCH == i386 || ARCH == i8086
typedef u32 ptr;
#elif ARCH == x86_64
typedef u64 ptr;
#else
#warning "Wrong ARCH defined"
#endif

#define packed __attribute__((packed))
#define noreturn __attribute__((noreturn))
#define noinline __attribute__((noinline))

#define asm __asm__

typedef u32 result;
#define SUCCESS (0)
#define ERROR (-1)
